/**
 * @param {string} s
 * @return {string}
 */
var reverseWords = function(s) {
  let arr = s.split(' ');
  let result = [];
  for (let i = 0; i < arr.length; i++) {
    const element = arr[i];
    result.push(element.split('').reverse());
  }
  return result.join(' ')
};